import Vue from 'vue';

export namespace N_AddHydrationSettings {
  export interface SwitchState {
    value: boolean;
    code: string;
  }

  export interface TankParameter {
    value: number;
    code: string;
  }

  export interface TankStatus {
    value: number | boolean;
    code: string;
  }

  export interface ChemicalTank {
    name: string;
    upAlarmLimit: TankParameter;
    setUpperLimit: TankParameter;
    setLowerLimit: TankParameter;
    lowAlarmLimit: TankParameter;
    actualValue: TankParameter;
    autoSwitch: TankStatus;
    waterStatus: TankStatus;
    alarmStatus: TankStatus;
  }

  export interface WaterTank {
    name: string;
    hignLevel: TankStatus;
    lowLevel: TankStatus;
    levelStatus: TankStatus;
    autoSwitch: TankStatus;
    waterStatus: TankStatus;
  }

  export interface DosingTank {
    name: string; // (参数名称)
    setCount: TankParameter; // (设定挂数)
    totalCount: TankParameter; // (累计挂数)
    runSetTime: TankParameter; // (运行设时)
    runTimer: TankParameter; // (运行计时)
    autoSwitch: TankStatus; // (自动开关)
    dosingStatus: TankStatus; // (添加状态)
  }
  export interface cAddHydrationSettings extends Vue {
    waterMainSwitch: SwitchState;
    airMainSwitch: SwitchState;
    steamSwitch: SwitchState;
    chemicalTanks: ChemicalTank[];
    waterTanks: WaterTank[];
    ecDetCodes: string[];
    updateData: (res: any) => void;
  }
}
